<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link rel="stylesheet" href="css/style.css" type="text/css">  
	<link rel="stylesheet" href="css/green.css" type="text/css">  
	<script type="text/javascript" src="js/trimtpl.js"></script>
	<script type="text/javascript" src="js/lightcommons.js"></script>
	<script type="text/javascript" src="js/bundle.js"></script>
	<script type="text/javascript" src="js/messages.js"></script>
	<script>
		var bundle,msg;
		window.onDomReady(function(){
			bundle=new Bundle('doc_jst');
			msg = bundle.toLocale(messages);
			bundle.parse(msg,'page');
			document.title=msg.app_title;
		});
		function render(txt){
			$ID('main').innerHTML=txt.process(msg);
		}
		function jump(doc){
			var t=doc.lastIndexOf('.');
			var x=doc.substring(0,t)+'_'+bundle.locale+doc.substring(t);
			Request.doGet(x,function(xhr){
				render(xhr.responseText);
			},function(){
				Request.doGet(doc,function(xhr){
					render(xhr.responseText);
				},
				function(xhr){
					render('${not_found}');
				});		
				
			});


		}		
	</script>
	</head>
	<body>
<!----------- Template doc_jst --------------->	
<textarea id="doc_jst" style="display:none;">
<div id="header">
<h1>${app_title}</h1>
<span><a href='?locale=zh'>中文版</a> | <a href='?locale=en'>English</a></span>
</div>
<div id="center">
	<div id="left">
		${locale}<br>
		<a href='javascript:void(0)' onclick="jump('logger.html')" value='xx'>Light logger tutorial</a>
		<a href='javascript:void(0)' onclick="jump('xxx.html')" value='xx'>xxx</a>
	</div>
	<div id="main">
		
	</div>
</div>
<div id="footer">
</div>
</textarea>		
<!----------- end doc_jst -------------------->	
		<div id="page">
		</div>
	</body>
</html>